package com.zh.springcloud.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zh.springcloud.common.Result;
import com.zh.springcloud.entity.Payment;
import com.zh.springcloud.mapper.PaymentMapper;
import com.zh.springcloud.service.PaymentService;
import org.springframework.stereotype.Service;

/**
 * @Description:
 * @ClassName PaymentServiceImpl
 * @date: 2021.06.08 15:14
 * @Author: zhanghang
 */
@Service
public class PaymentServiceImpl extends ServiceImpl<PaymentMapper, Payment> implements PaymentService {

	@Override
	public Result<?> savePayment(Payment payment) {
		boolean retval = this.save(payment);
		return retval ? Result.ok() : Result.error("");
	}

	@Override
	public Payment getPaymentById(Long id) {
		return baseMapper.selectById(id);
	}
}
